import request from '@/utils/request'

export function queryList(data) {
  return request({
    url: '/plm-sys/api/sysRole/queryPageList',
    method: 'post',
    data
  })
}

export function add(data) {
  return request({
    url: '/plm-sys/api/sysRole/add',
    method: 'post',
    data
  })
}

export function copyAdd(data) {
  return request({
    url: '/plm-sys/api/sysRole/addByOne',
    method: 'post',
    data
  })
}

export function queryAllGroup(ids) {
  return request({
    url: '/plm-sys/api/sysUsergroup/queryList',
    method: 'get'
  })
}

export function view(id) {
  return request({
    url: '/plm-sys/api/sysRole/view?id=' + id,
    method: 'get'
  })
}

export function update(data) {
  return request({
    url: '/plm-sys/api/sysRole/update',
    method: 'put',
    data
  })
}

export function del(ids) {
  return request({
    url: '/plm-sys/api/sysRole/dels',
    method: 'delete',
    data: ids
  })
}

